import { S } from '../../s';
import { IPSAppCounter } from './ipsapp-counter';
import { IPSAppCounterRef } from './ipsapp-counter-ref';
import { PSSysCounterRefImpl } from '../../control/counter/pssys-counter-ref-impl';

export class PSAppCounterRefImpl
  extends PSSysCounterRefImpl
  implements IPSAppCounterRef
{
  protected psappcounter: IPSAppCounter;
  getPSAppCounter(): IPSAppCounter | null {
    return (
      this.psappcounter ||
      (this.psappcounter = this.fillObjectModel(
        S._a,
        this.M.getPSAppCounter,
        S._2e2,
      ) as IPSAppCounter)
    );
  }
  get cls(): string {
    return 'PSAppCounterRefImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._9d) return true;
    return super.instanceof(cls);
  }
}
